package org.example.springmvc_demo6.mapper;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.springmvc_demo6.model.MessageInfo;

import java.util.List;

@Mapper
public interface MessageInfoMapper {

    @Insert("insert into message_info (`from`, `to`, `message`) values (#{from}, #{to}, #{message})")
    Integer insertMessage(MessageInfo messageInfo);


    @Select("select * from message_info where delete_flag = 0")
    List<MessageInfo> selectMessageInfo();

}
